<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>v-bind动态绑定</title>
    <style>
        .active{
            color: red;
        }
    </style>
</head>
<body>
    <div id="app" v-cloak>
<!--        <h2 class="active">{{message}}</h2>-->
<!--        <h2 :class="active">{{message}}</h2>-->
        <h2 v-bind:class="[active1,'line']">{{message}}</h2>
    </div>
</body>
  <script src="../js/vue.js"></script>
  <script>
      var app = new Vue({
          el: '#app',
          data: {
              message: '图片',
              active1: 'active',
              isActive: true,
          },
      })
  </script>
</html>